package com.hyper_yang._03_designpatterns.principles.demo4.before;

/**
 * 单一职责原则-反例
 * 一个文档类，既负责保存也负责打印
 */
public class Document {
    private String content;

    public Document(String content) {
        this.content = content;
    }

    public void save() {
        System.out.println("保存文档: " + content);
    }

    public void print() {
        System.out.println("打印文档: " + content);
    }
}
